package com.ly.cyclictest.Test03;

//司令
public class CyclicBarrierRun implements Runnable {

    static boolean flag = false;

    int Num;

    public CyclicBarrierRun(int num) {
        Num = num;
        System.out.println("司令:集合");
    }

    @Override
    public void run() {
        if(flag){
            System.out.println("回");
        }else {
            System.out.println("执行");
            flag = true;
        }

    }
}
